home *** CD-ROM | disk | FTP | other *** search
- package koala.dynamicjava.classinfo;
-
- import koala.dynamicjava.tree.FieldDeclaration;
-
- public class TreeFieldInfo implements FieldInfo {
- private FieldDeclaration fieldTree;
- private ClassFinder classFinder;
- private ClassInfo type;
- private ClassInfo declaringClass;
- private TypeVisitor typeVisitor;
-
- public FieldDeclaration getFieldDeclaration() {
- return this.fieldTree;
- }
-
- public int getModifiers() {
- return this.fieldTree.getAccessFlags();
- }
-
- public ClassInfo getType() {
- if (this.type == null) {
- this.type = (ClassInfo)this.fieldTree.getType().acceptVisitor(this.typeVisitor);
- }
-
- return this.type;
- }
-
- public String getName() {
- return this.fieldTree.getName();
- }
-
- public boolean equals(Object var1) {
- return var1 != null && var1 instanceof TreeFieldInfo ? this.fieldTree.equals(((TreeFieldInfo)var1).fieldTree) : false;
- }
-
- public TreeFieldInfo(FieldDeclaration var1, ClassFinder var2, ClassInfo var3) {
- this.fieldTree = var1;
- this.classFinder = var2;
- this.declaringClass = var3;
- this.typeVisitor = new TypeVisitor(this.classFinder, this.declaringClass);
- }
- }
-